const mongoose = require('mongoose');
const Schema = mongoose.Schema;

const blogList = new Schema({
    'browse': Number,
    'title': String,
    'label': String,
    'name': String,
    'type': Number,
    'creationTime': String,
    'info': String,
    'mold': Number,
    'mag': Array
},{ versionKey: false });

const headNav = new Schema({
    'name': String,
    'route': String,
    'children': Array,
    'creationTime': String
})

const myInfo = new Schema({
    'portrait': String,
    'introduce': String,
    'mailbox': String,
    'mayun': String,
    'creationTime': String
})

const blogMessage = new Schema({
    'name': String,
    'mailbox': String,
    'info': String,
    'children': Array,
    'type': Number,
    'creationTime': String
}, { versionKey: false })

const articleMas = new Schema({
    'name': String,
    'mailbox': String,
    'info': String,
    'mag': Array,
    'type': Number,
    'creationTime': String
}, { versionKey: false })

module.exports = {
    blogList: mongoose.model('article_list', blogList, 'article_list'),
    headNav: mongoose.model('head_nav', headNav, 'head_nav'),
    myInfo: mongoose.model('my_info', myInfo, 'my_info'),
    blogMessage: mongoose.model('blog_message', blogMessage, 'blog_message'),
    articleMas: mongoose.model('article_mas', articleMas, 'article_message'),
}